home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / gutenprintui2 / gutenprintui.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-03-15  |  6.2 KB  |  183 lines

  1. /*
  2.  * "$Id: gutenprintui.h,v 1.2 2005/01/28 03:02:18 rlk Exp $"
  3.  *
  4.  *   Print plug-in for the GIMP.
  5.  *
  6.  *   Copyright 1997-2000 Michael Sweet (mike@easysw.com),
  7.  *    Robert Krawitz (rlk@alum.mit.edu). and Steve Miller (smiller@rni.net
  8.  *
  9.  *   This program is free software; you can redistribute it and/or modify it
  10.  *   under the terms of the GNU General Public License as published by the Free
  11.  *   Software Foundation; either version 2 of the License, or (at your option)
  12.  *   any later version.
  13.  *
  14.  *   This program is distributed in the hope that it will be useful, but
  15.  *   WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  16.  *   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  17.  *   for more details.
  18.  *
  19.  *   You should have received a copy of the GNU General Public License
  20.  *   along with this program; if not, write to the Free Software
  21.  *   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  22.  *
  23.  *
  24.  * Revision History:
  25.  *
  26.  *   See ChangeLog
  27.  */
  28.  
  29. #ifndef GUTENPRINTUI_H
  30. #define GUTENPRINTUI_H
  31.  
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35.  
  36.  
  37. #ifdef __GNUC__
  38. #define inline __inline__
  39. #endif
  40.  
  41. #include <gtk/gtk.h>
  42.  
  43. #include <gutenprint/gutenprint.h>
  44.  
  45. #include <gutenprintui2/curve.h>
  46. #include <gutenprintui2/gammacurve.h>
  47. #include <gutenprintui2/typebuiltins.h>
  48.  
  49. /*
  50.  * All Gimp-specific code is in this file.
  51.  */
  52.  
  53. typedef enum
  54. {
  55.   ORIENT_AUTO = -1,
  56.   ORIENT_PORTRAIT = 0,
  57.   ORIENT_LANDSCAPE = 1,
  58.   ORIENT_UPSIDEDOWN = 2,
  59.   ORIENT_SEASCAPE = 3
  60. } orient_t;
  61.  
  62. /*
  63.  * If this is changed, command_options[] in panel.c must be appropriately
  64.  * updated.
  65.  */
  66. typedef enum
  67. {
  68.   COMMAND_TYPE_DEFAULT,
  69.   COMMAND_TYPE_CUSTOM,
  70.   COMMAND_TYPE_FILE
  71. } command_t;
  72.  
  73. typedef struct        /**** Printer List ****/
  74. {
  75.   char        *name;        /* Name of printer */
  76.   command_t    command_type;
  77.   char        *queue_name;
  78.   char        *extra_printer_options;
  79.   char        *custom_command;
  80.   char        *current_standard_command;
  81.   char        *output_filename;
  82.   float        scaling;      /* Scaling, percent of printable area */
  83.   orient_t    orientation;
  84.   int        unit;      /* Units for preview area 0=Inch 1=Metric */
  85.   int        auto_size_roll_feed_paper;
  86.   int        invalid_mask;
  87.   stp_vars_t    *v;
  88. } stpui_plist_t;
  89.  
  90. typedef struct stpui_image
  91. {
  92.   stp_image_t im;
  93.   void (*transpose)(struct stpui_image *image);
  94.   void (*hflip)(struct stpui_image *image);
  95.   void (*vflip)(struct stpui_image *image);
  96.   void (*rotate_ccw)(struct stpui_image *image);
  97.   void (*rotate_cw)(struct stpui_image *image);
  98.   void (*rotate_180)(struct stpui_image *image);
  99.   void (*crop)(struct stpui_image *image, int left, int top,
  100.            int right, int bottom);
  101. } stpui_image_t;  
  102.  
  103. /*
  104.  * Function prototypes
  105.  */
  106. extern void stpui_plist_set_name(stpui_plist_t *p, const char *val);
  107. extern void stpui_plist_set_name_n(stpui_plist_t *p, const char *val, int n);
  108. extern const char *stpui_plist_get_name(const stpui_plist_t *p);
  109.  
  110. extern void stpui_plist_set_queue_name(stpui_plist_t *p, const char *val);
  111. extern void stpui_plist_set_queue_name_n(stpui_plist_t *p, const char *val, int n);
  112. extern const char *stpui_plist_get_queue_name(const stpui_plist_t *p);
  113.  
  114. extern void stpui_plist_set_output_filename(stpui_plist_t *p, const char *val);
  115. extern void stpui_plist_set_output_filename_n(stpui_plist_t *p, const char *val, int n);
  116. extern const char *stpui_plist_get_output_filename(const stpui_plist_t *p);
  117.  
  118. extern void stpui_plist_set_extra_printer_options(stpui_plist_t *p, const char *val);
  119. extern void stpui_plist_set_extra_printer_options_n(stpui_plist_t *p, const char *val, int n);
  120. extern const char *stpui_plist_get_extra_printer_options(const stpui_plist_t *p);
  121.  
  122. extern void stpui_plist_set_custom_command(stpui_plist_t *p, const char *val);
  123. extern void stpui_plist_set_custom_command_n(stpui_plist_t *p, const char *val, int n);
  124. extern const char *stpui_plist_get_custom_command(const stpui_plist_t *p);
  125.  
  126. extern void stpui_plist_set_copy_count(stpui_plist_t *p, gint count);
  127. extern int stpui_plist_get_copy_count(const stpui_plist_t *p);
  128.  
  129. extern void stpui_plist_set_current_standard_command(stpui_plist_t *p, const char *val);
  130. extern void stpui_plist_set_current_standard_command_n(stpui_plist_t *p, const char *val, int n);
  131. extern const char *stpui_plist_get_current_standard_command(const stpui_plist_t *p);
  132.  
  133. extern void stpui_plist_set_command_type(stpui_plist_t *p, command_t val);
  134. extern command_t stpui_plist_get_command_type(const stpui_plist_t *p);
  135.  
  136. extern void stpui_set_global_parameter(const char *param, const char *value);
  137. extern const char *stpui_get_global_parameter(const char *param);
  138.  
  139. extern void stpui_plist_copy(stpui_plist_t *vd, const stpui_plist_t *vs);
  140. extern int stpui_plist_add(const stpui_plist_t *key, int add_only);
  141. extern void stpui_printer_initialize(stpui_plist_t *printer);
  142. extern const stpui_plist_t *stpui_get_current_printer(void);
  143.  
  144. extern char *stpui_build_standard_print_command(const stpui_plist_t *plist,
  145.                         const stp_printer_t *printer);
  146.  
  147. extern void stpui_set_printrc_file(const char *name);
  148. extern const char * stpui_get_printrc_file(void);
  149. extern void stpui_printrc_load (void);
  150. extern void stpui_get_system_printers (void);
  151. extern void stpui_printrc_save (void);
  152. extern void stpui_set_image_filename(const char *);
  153. extern const char *stpui_get_image_filename(void);
  154. extern void stpui_set_errfunc(stp_outfunc_t wfunc);
  155. extern stp_outfunc_t stpui_get_errfunc(void);
  156. extern void stpui_set_errdata(void *errdata);
  157. extern void *stpui_get_errdata(void);
  158.  
  159. extern gint stpui_do_print_dialog (void);
  160.  
  161. extern gint stpui_compute_orientation(void);
  162. extern void stpui_set_image_dimensions(gint width, gint height);
  163. extern void stpui_set_image_resolution(gdouble xres, gdouble yres);
  164. extern void stpui_set_image_type(const char *image_type);
  165. extern void stpui_set_image_raw_channels(gint channels);
  166. extern void stpui_set_image_channel_depth(gint bit_depth);
  167.  
  168. typedef guchar *(*get_thumbnail_func_t)(void *data, gint *width, gint *height,
  169.                     gint *bpp, gint page);
  170. extern void stpui_set_thumbnail_func(get_thumbnail_func_t);
  171. extern get_thumbnail_func_t stpui_get_thumbnail_func(void);
  172. extern void stpui_set_thumbnail_data(void *);
  173. extern void *stpui_get_thumbnail_data(void);
  174.  
  175. extern int stpui_print(const stpui_plist_t *printer, stpui_image_t *im);
  176.  
  177.  
  178. #ifdef __cplusplus
  179.   }
  180. #endif
  181.  
  182. #endif  /* GUTENPRINTUI_H */
  183.